# encoding=utf8

import os

from flask_script import Manager
from flask_migrate import MigrateCommand
from app import create_app
from app.websocket import socket_io

config_name = os.environ.get('FLASK_CONFIG') or 'default'
app = create_app('default')

manager = Manager(app)
manager.add_command('db', MigrateCommand)
manager.add_command('run', socket_io.run(app=app, host='0.0.0.0', port=5000))


if __name__ == '__main__':
    manager.run()

